#pragma once
#ifndef OBR_VIRTUALPROGRAMENTRY_H
#define OBR_VIRTUALPROGRAMENTRY_H

#include "ProgramEntry.h"

namespace OBR
{

/**
 * @brief this abstract class represent programs with virtual functionality during rendering
 *
 */
class VirtualProgramEntry : public ProgramEntry
{
public:
    // use program id -> program instance id to identify instance
    int program_id, program_instance_id;

public:
    VirtualProgramEntry(std::string cuda_source_path);
    virtual ~VirtualProgramEntry();

    /**
     * @brief upload Callable SBT data to entry
     *
     */
    virtual void uploadVirtualProgramPayload(
        std::vector<std::shared_ptr<VirtualProgramEntry>> instances) = 0;

    /**
     * @brief Get the device ptr for this type of payload (one for each most derived type)
     *
     * @return CUdeviceptr
     */
    virtual CUdeviceptr getPayloadDevicePtr() = 0;

    /**
     * @brief this should throw an error
     *
     */
    void uploadSbtData() final;
};

} // namespace OBR

#endif
